import request from '@/utils/request'

// 查询用友合同数据列表
export function listConstruct(query) {
  return request({
    url: '/sci/construct/list',
    method: 'get',
    params: query
  })
}

// 查询用友合同数据详细
export function getConstruct(id) {
  return request({
    url: '/sci/construct/' + id,
    method: 'get'
  })
}

// 新增用友合同数据
export function addConstruct(data) {
  return request({
    url: '/sci/construct',
    method: 'post',
    data: data
  })
}

// 修改用友合同数据
export function updateConstruct(data) {
  return request({
    url: '/sci/construct',
    method: 'put',
    data: data
  })
}

// 删除用友合同数据
export function delConstruct(id) {
  return request({
    url: '/sci/construct/' + id,
    method: 'delete'
  })
}

// 查询合同标的物信息
export function getContractDetails(contractCode) {
  return request({
    url: '/sci/construct/detailsListById/' + contractCode,
    method: 'get'
  })
}

// 查询合同付款明细
export function getPayPlans(contractCode) {
  return request({
    url: '/sci/construct/payPlanslistById/' + contractCode,
    method: 'get'
  })
}
